import request from '@/utils/request';
/**
 *
 * 分类管理
 *
 **/

// 查询分类列表接口
export const getCategoryPage = (params: any) => {
  return request({
    url: '/background/type/page',
    method: 'get',
    params
  });
};

// 删除接口
export const deleCategory = (id: string) => {
  return request({
    url: `/background/type/delete/${id}`,
    method: 'post',
    params: { id:id }
  });
};

// 修改接口
export const editCategory = (params: any) => {
  return request({
    url: '/background/type/update',
    method: 'post',
    data: { ...params }
  });
};

// 新增接口
export const addCategory = (params: any) => {
  return request({
    url: '/background/type/add',
    method: 'post',
    data: { ...params }
  });
};

// 修改---启用禁用接口
export const enableOrDisableEmployee = (params: any) => {
  return request({
    url: `/background/type/status/${params.status}`,
    method: 'post',
    params: { id:params.id }
  })
}
// 查询详情接口
export const querySetmealById = (id: string | (string | null)[]) => {
  return request({
    url: `/background/type/${id}`,
    method: 'get'
  })
}